<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!--<link rel="stylesheet" href="../static/css/index.css" th:href="@{/static/css/index.css}">-->
</head>
<body>
<!-- 从后台传过来的内容去 替换hello world -->
<h1 data-th-text="${name}" >Hello World</h1>
<h1 th:text="${name}" >Hello World</h1>
${name}

<div>
    用户姓名：<input th:id="${student.name}" th:name="${student.name}" th:value="${student.name}" >
    <br/>
    用户年龄：<input th:value="${student.age}">
    <br/>
    用户生日：<input th:value="${student.birth}">
    <br/>
    用户生日：<input th:value="${#dates.format(student.birth,'yyyy-MM-dd')}">
    <br/>
</div>
<br/>
<div th:object="${student}">
    用户姓名：<input th:id="*{name}" th:name="*{name}" th:value="*{name}" >
    <br/>
    用户年龄：<input th:value="*{age}">
    <br/>
    用户生日：<input th:value="*{birth}">
    <br/>
    用户生日：<input th:value="*{#dates.format(birth,'yyyy-MM-dd')}">
    <br/>
</div>
<br/>
<br/>

<form th:action="@{/index/login}" th:object="${student}" method="post" th:method="post">
    <input type="text" th:field="*{name}"/>
    <input type="text" th:field="*{age}"/>
    <input type="submit"/>
</form>
<br/>
<select>
    <option>-----</option>
    <option th:selected="${student.name eq 'lisi'}">管理员</option>
    <option th:selected="${student.name eq 'ww'}">普通用户</option>
    <option>游客</option>
</select>
<br><br>
<table>
    <tr>
        <th>ID</th>
        <th>姓名</th>
    </tr>
    <tr th:each="u:${uList}">
        <td th:text="${u.id}"></td>
        <td th:text="${u.name}" ></td>
    </tr>
</table>
</body>
</html>